<template>
  <Select v-bind="$attrs" ref="el">
    <!-- 无数据 -->
    <template #empty>
      <slot name="empty">
        <div class="pt40 pb40" style="text-align: center">
          <div class="font-16">暂无数据</div>
        </div>
      </slot>
    </template>
    <template v-for="(value, key) in $slots" :key="key" #[key]="scope">
      <slot :name="key" v-bind="scope"></slot>
    </template>
  </Select>
</template>
<script setup lang="ts" name="ElSelect">
import { useAttrs, useSlots, ref, provide } from "vue";
import * as ElementPlus from "element-plus";
import { exposeProxy } from "../../utils/index";

const $attrs: any = useAttrs();
const $slots: { [property: string]: any } = useSlots();
const Select: any = ElementPlus.ElSelect;
const el: any = ref();
provide("multiple", $attrs.multiple);
provide("modelValue", () => $attrs.modelValue) as any;
defineExpose(exposeProxy({ focus() {}, blur() {} }, el));
</script>
